Initialization of Objects and Attributes |
|
Initialization is necessary to check the behaviour of an object when business logic is applied on it. Objects are initialized when Validate requests are fired. In a Validate SOAP request, theqInitattribute is used (at the object level) to initialize the object.qInitaccepts two values:
- 1 - setsqInitto true and initializes the object
- 0 - setsqInitto false and does not initialize the object
Even before an object is initialized in a Validate SOAP request, the initial values should be set to both the object and its attributes. This is done using the implicit and explicit event listeners.
Setting Initial Values to an Object
USING IMPLICIT LISTENER
In the extension class of the object, write the application logic in the onInitialize method.
USING EXPLICIT LISTENER
Register a class that implements the IObjectInitializeListener interface.
Setting Initial Values to an Attribute
USING IMPLICIT LISTENER
In the extension class, write the application logic in the onInitialize_<Attribute Name> method.
USING EXPLICIT LISTENER
Register a class that implements the IAttributeInitializeListener interface.
For further information on using these methods, see the WS-AppServer SDK.